package com.sunxu.spring.tx;

import com.sunxu.spring.tx.service.UserService;
import com.sunxu.spring.tx.vo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 孙许
 * @date 2018-07-17
 * @description
 */
public class Application {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        UserService service = context.getBean(UserService.class);
        User user = new User("孙许", 25);
        service.saveUser(user);
    }
}
